package com.service.user;

import com.dao.user.UserMapper;
import com.javabean.User;

import java.util.List;

public class UserServiceImpl implements UserService {

    private UserMapper userMapper;

    public void setUserMapper(UserMapper userMapper) {
        this.userMapper = userMapper;
    }

    @Override
    public int add(User user) {
        return 0;
    }

    @Override
    public User getLoginUser(String userCode, String userPassword) {
        return userMapper.getLoginUser(userCode, userPassword);
    }

    @Override
    public List<User> getUserList(String userName, int userRole, int currentPageNo, int pageSize) {
        return userMapper.getUserList(userName, userRole, currentPageNo, pageSize);
    }

    @Override
    public Integer getUserCount(String userName, int userRole) {
        return userMapper.getUserCount(userName, userRole);
    }

    @Override
    public Integer deleteUserById(Integer delId) {
        return userMapper.deleteUserById(delId);
    }

    @Override
    public User getUserById(String id) {
        return null;
    }

    @Override
    public int modify(User user) {
        return 0;
    }

    @Override
    public int updatePwd(int id, String pwd) {
        return userMapper.updatePwd(id, pwd);
    }


}
